APS identification allocation in communication networks

ABSTRACT

Squelch identifiers for re-routing a broken path through interconnected network elements of a communication network incorporating BLSR protection are allocated by a method comprising: determining chain links between network elements; setting attributes (begin, middle, end) corresponding to the chain links; building chains by joining chain links together; matching pairs of chains connecting network elements at the ends of chains; and allocating squelch identifiers to those network elements interconnected by matching pairs of chains. Each chain link represents two termination points and an intermediate subnetwork connection. The step of building chains comprises joining chain links having matching termination points. The step of matching pairs of chains comprises searching for chains interconnecting the same two network elements but pointing in opposite directions.

FIELD OF THE INVENTION

[0001] The present invention is concerned with allocating APS attributesto network element ports in a communication network. In particular, theinvention concerns an algorithm to allocate such attributes in networksprotected by BLSR.

BACKGROUND TO THE INVENTION

[0002] Communication networks, especially optical networks, such asSONET or SDH networks, support a protection scheme known as BLSR. Theobjective of BLSR is to provide an alternative route for data if a breakor other fault occurs in the intended path through the network elementsmaking up the network.

[0003] The following explanation is intended to illustrate the point.Part of a network can be represented by a ring of network elements (NEs)interconnected by the path allocated for the data. Each port of each NEis allocated an identifier, known as an Automatic Protection Switch(APS) ID, so that the connectivity of each port is made known to themanagement system of the network. In the present example, the ports inand out of an NE carry the same ID attribute. These typically range from1 to 8. Traffic is intended to be carried over a path entering the firstNE at an input port allocated an ID=1 and exiting the ring via an exitport of the NE with ID=5. The NEs along the path will therefore carrythe attributes 1,5 indicating the entry and exit points of the ring.Further examples will be given in the specific description of thepreferred embodiments later in the specification. It is assumed that thepresent example operates under the STM16 type ring, in which there are 8slots allocated for traffic and 8 for protection.

[0004] In APS systems, it is clearly essential for the protection systemmanager to be able to find an alternative route round the network in theevent of a fault occurring in the intended path. This function is knownas “squelching”. It follows that each NE port needs to be assigned aspecific identifier, the squelch identifier or squelch ID, which enablesthe manager to identify a suitable re-routing path. For each NE theremay be up to 2 entry and up to 2 exit squelch IDs. In the situationwhere three rings are linked together, there will be 3 squelch IDs forthe NEs indicated in the outer rings and 4 squelch IDs for the innerring. The squelch Ids are allocated once the ring is commissioned. It isimportant to appreciate that a single NE can be part of two rings. Inthis case, the common NE may be a hub. The squelch IDs perform twofunctions, depending on the function/position of the NE in relation tothe ring. Thus, the squelch ID will perform an aggregate function, ifthe NE forms part of a ring, and a tributary function, if the NE inquestion is located in a part of a ring where paths may enter or exitthe ring.

[0005] In known communication networks operating with protection systemssuch as BLSR, the squelch Ids have had to be entered manually, once therings have been commissioned. This can be a time-consuming operation. Itis beneficial if the client can be spared this task. There is atherefore a need in communication networks operating with protectionsystems to generate the squelch IDs automatically.

SUMMARY OF THE INVENTION

[0006] A method of allocating squelch identifiers in a communicationnetwork incorporating BLSR protection, the network comprising aplurality of interconnected Network Elements (NEs), the methodcomprising:

[0007] Determining chain links between NEs;

[0008] Setting attributes (begin, middle, end) corresponding to thechain links;

[0009] Building chains by joining chain links together;

[0010] Matching pairs of chains connecting NEs at the ends of chains;and

[0011] Allocating squelch identifiers to those NEs interconnected bymatching pairs of chains.

[0012] In the above method, the chains are built up from chain linkshaving the same terminating identifiers. Data representing the built upchains can then be searched to establish pairs of chains interconnectingthe same two NEs but pointing in opposite directions.

[0013] Each chain link preferably consists of a termination point ateach end and an intermediate sub-network connection (SNC). Eachtermination point (TP) is a representation of the relevant port in aspecific layer/traffic rate in a layered protocol and each SNCrepresents the connectivity between 2-4 termination points.

[0014] The invention also includes a BLSR-protected communicationnetwork provided with squelch identifiers according to the above method,to signals transmitted over such a network and to a carrier for analgorithm adapted to perform the squelch identifier allocation method.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The invention will be described with reference to the followingdrawings, in which:

[0016]FIG. 1 represents a Trail with two broken lines;

[0017]FIG. 2 represents a multi-span ring;

[0018]FIG. 3 represents a real trail in two rings

[0019]FIG. 4 represents a real trail ion three rings;

[0020]FIG. 5 contrasts earlier attempts at solving the problem addressedby the invention;

[0021]FIG. 6 represents current chains in the solution according to theinvention;

[0022]FIG. 7 represents new chains in a protected ring;

[0023]FIG. 8 is a general flow diagram showing chain building;

[0024]FIG. 9 is a flow diagram showing protected SNC processing;

[0025]FIG. 10 is a flow diagram showing Recuirsive Chain Building;

[0026]FIG. 11 is a flow diagram showing Chain Link Processing;

[0027]FIG. 12 is a flow diagram showing the building of Chain Pairs;

[0028]FIG. 13 represents the new APS ids Class Diagram;

[0029]FIG. 14 is a component diagram;

[0030]FIG. 15 is a calculator Class Diagram;

[0031]FIG. 16 is an APS TPs Class Diagram;

[0032]FIG. 17 is a Chain Link Class Diagram;

[0033]FIG. 18 is a Chain Pair Class Diagram;

[0034]FIG. 19 is a typical example of Match Node Architecture;

[0035]FIG. 20 illustrates a stage reached in part of the allocationprocess;

[0036]FIG. 21 illustrates the results of the above stage;

[0037]FIG. 22 illustrates a stage reached in connection with a hub;

[0038]FIG. 23 illustrates the corresponding results; and

[0039]FIG. 24 is a block diagram of the preferred allocation mechanism.

DETAILED DESCRIPTION OF THE ILLUSTRATED EMBODIMENTS

[0040] The objective of the invention is to provide an automatic systemfor allocating squelch Ids enabling a communication path through anetwork to be re-routed if there is a break or other fault in theintended path or in a NE along that path. In essence, an algorithmestablishes all the chain links between adjacent pairs of NEs. Each suchlink contains a subnetwork connection (SNC) and a termination point (TP)at each end. Data representing these chain links are stored andindividual chains built up from connectivity data linking NE to NE. Asearch is then conducted to find matched pairs of chains. These pairswill be chains that start and end at the same NEs but point in oppositedirections through the chain. It is then comparatively straightforwardto allocate the squelch Ids once the path is recognised.

[0041] In this specification, two scenarios will first be consideredwhich current Squelch Id allocation systems cannot cope with, then thesituation in a real NE will be considered, and the solution to theproblem will be presented, with the previous sections in mind.

[0042] 1. Two lines broken scenario/One node failing

[0043]FIG. 1 represents the two lines broken scenario in which two ringscomprising three nodes 1, 2, 3 interconnected by paths 4, are themselvesinterconnected, one ring with the other, by two tributaries representedby dashed lines 5. The numbers 1, 2, 3 inside the nodes are the portIds. The inner lines 6 represent the trail. This opens protection innode 2 in the first ring and closes it in node 2 in the second ring. Ifthe two trail lines in the first ring are cut, as indicated at 7, thetraffic from node 1 will not be able to reach node 2. However, trafficcan still get out of the ring using node 3 in the first ring, since thetrail is protected using this node. This suggests the introduction of asecond APS Id which, in this case, will be 3 in node 1.

[0044] This scenario is equivalent to the one node failing scenario.This would happen if node 2 in the figure fails. The result is the sameas in the previous case.

[0045] 2. Multi span ring scenario

[0046] The second scenario happens when a ring is controlled bydifferent spans, such as illustrated in FIG. 2. There are threedifferent spans controlling the ring. Each span controls two nodes.

[0047] Consider a trail that goes through node 2. This node knowsnothing about the nodes controlled by Span 1 and Span 2, and the trailenters the ring through these nodes, so if something happens node 2 willnot be able to re-route the traffic using only one APS Id. It needs toknow exactly which nodes are used to enter and exit the trail in thering.

[0048] A real NE

[0049] In a real ring each NE will have 4 variables: namely A, A′ (Aprime), Z and Z′ (Z prime). A is the node through which the trail entersthe ring and Z the node through which the trail exits it. The primevariables are the protection nodes to A and Z. In this way, if the trailis not protected only A and Z will have value. These variables will bethe same in every node in the ring belonging to the same trail. FIG. 3shows the application to the trail in FIG. 1. There are two differentset of values, one per ring. In the first ring A′ does not have anyvalue, since A is not protected. On the second ring the situation is thesame with Z′.

[0050] Another scenario is the case in which the four attributes are allneeded, as shown in the middle ring 1-5 in FIG. 4.

[0051] The solution

[0052] In network management solutions where there is only one value ofAPS Id, it is not enough to cope with all the possible scenarios. Also,in the current APS Ids implementation the Squelch Ids are set in eachTP. This means that two TPs belonging to the same NE can have differentIds, and of course, these values will be different in each node in thering, while in the real implementation these values are the same inevery node.

[0053] The present invention uses a different approach, approximatingcloser to the real implementation of NEs in a network. As alreadymentioned, four attributes A, A′, Z and Z′ are utilised. When theseattributes are utilised in a communication network using trails (thepresent applicant operates a network using a specific management systemknown as Trail Manager, or TM for short) these TM attributes will berepresented by TPAM attributes, like the current squelch Ids. Theircorrespondence is represented in the following table: TABLE 1 APS IDattribute correspondence Real Attributes TM Attributes TPAM AttributesA, Z A A_SquelchApsId A′, Z′  A′ A_Prime_SquelchApsId A, Z ZZ_SquelchApsId A′, Z′  Z′ Z_Prime_SquelchApsId

[0054] In this specification, a convention is used for labelling theentries and exits. Wherever there are two entries or exits to/from anode A, say, they will be indicated by A and A′ (A Prime), as shown inFIGS. 3 and 4, for example

[0055] In contrast to a known technique for identifying APS Ids, whichutilises the three steps of (1) Building Chain Links; (2) BuildingChains using Chain Links; and (3) Allocating the Ids, the presentinvention, in its preferred form, builds the chains in such a way thatthere are only two chains per ring, one in each direction. The newchains have branches. They will begin in the entry to the ring node andwill finish in the exit to the ring node. If there are two exits or twoentries the chain will have branches. The manner in which these threesteps are implemented will be described as follows. In the knowntechnique of FIG. 6 there are four chains, two in each direction. Thenew chains will have only two chains, one per direction. These chainswill span all the ring and they will have branches, as can be seen inFIG. 7:

[0056] The chain to the right has one begin and two ends, while theother one has one end and two begins. The new algorithm will be able tobuild these chains. In contrast, the new chains are built using the samechain links produced by the first step in the previous algorithm, so itis being re-used. This is very important since this is the mostdifficult and most code consuming step.

[0057] Once the new chains are created, the Ids can be allocated. Thiswill be done, in this embodiment, in two different steps, namely:

[0058] 1. Identify A, A′, Z and Z′.

[0059] 2. Set the attributes in all the TPs in the ring.

[0060] In the first step, referring to FIG. 7, the beginning of thechain is to the right. Z and Z′ are the begins of the chain to the left.Z is the begin in the node with protection, while Z′ is the begin of theone without protection.

[0061] The second step is to set the attributes. In order to do that,the attributes of all the TPs in one of the chains are set, using thevalues calculated in the previous section.

[0062] Building chains algorithm

[0063] As explained before, now there will be two chains per ring, onein each direction. These chains will therefore have branches, so thealgorithm is designed to cope with the new situation.

[0064] Referring to the Building Chains General Flow diagram of FIG. 8,at the beginning of the algorithm there is a list containing all thechain links in the trail. These chain links will now have an SNCidentifier, a unique number that identifies which SNC a chain link isrelated to. In this way it can be determined if two different chainlinks are related to the same SNC. From here a loop is performed throughevery chain link. If the beginning of a chain link is found, a new chainis created and the chain link is added to the chain. At this point thefollowing process starts (see FIG. 9):

[0065] 1. Check if the chain link is in a protected SNC. If it is, allthe chain links related to the same SNC (using the SNC identifier) areinvestigated so as to select the one in the same direction as the chainlink in question. This checking is done if the tails or the heads arethe same. If the tails are the same this means that the branch of thechain goes from begin to end (the next TP is determined from the head).If the heads are the same the branch goes from end to begin and theDirection variable is set to FALSE (the next TP is determined from thetail). A recursive call is performed to the function that contains thealgorithm for every new-found branch. Once finished, the processcontinues (see FIG. 10):

[0066] 2. Get the next TP from the current chain link and perform a loopthrough every chain link. Check if the next TP and the tail of thecurrent chain link are the same and the direction is TRUE (directionbegin to end) or if the head of the current chain link are the same andthe direction is FALSE (direction end to begin). If it is, add the chainlink to the chain and continue.

[0067] 3. Check if the chain link is a begin, a middle or an end.

[0068] 3.1. End. If not in a branch, consider that it is the last chainlink in the chain and return, setting the end to true. If in a branch,simply return setting the end of the branch.

[0069] 3.2. Middle. call again the algorithm recursively.

[0070] 3.3 Begin. There can only be a begin at this point if in a branchand the direction is end to begin. So set the end of the branch, set thebegin chain link to used, do not begin a new chain if find it later on,and return.

[0071] APS Ids allocation algorithm

[0072] At this point every chain in the trail has been built. There aretwo chains per ring. Now the attributes have to be determined. In thepreferred implementation, this is done in two steps:

[0073] 1. Build pairs: the first step is to group the chains in pairs.The flow diagram is shown in FIG. 12. The pairs will store the chainsbelonging to the same ring. In order to do that it is only necessary tocheck the SNC Ids. If the two chain links are found to belong todifferent chains and with the same SNC Id these two chains come from thesame ring. There is a case when this is not true, namely when a nodebelongs to two rings at the same time. In this case there will be fourchains with chain links having the same SNC Id so the next chain linkwill be investigated. In this case there will be no error.

[0074] 2. Identify the attributes: a collection of chain pairs has nowbeen built up. Each of those will have one or two begins and one or twoends. In the process of chain link creation the direction of the chainlinks had been set, so the direction of each chain in the pair is known.When a two direction chain link is registered, the one to the right isregistered first and then the one to the left. The direction is alsoregistered. So, in order to identify the attributes, the direction andthe begins are needed (they will be the attributes). The following casesexist:

[0075] Two begins (one per chain): this is an unprotected trail. The Awill be the begin with direction TRUE (to the right) and Z will be theother one.

[0076] Three begins (one in a chain and two in the other): now therewill be a prime attribute in the chain with two begins. To decide whichone is the prime, look at the SNC related to the chain link. If it isprotected it will be the no prime and the prime will be the one in theprotected SNC. So the node with protection will be A, the one in thesame chain without protection will be A prime and the one in the chainwith only one begin will be Z.

[0077] Four begins (two per chain): there will be two begins in bothchains so it is necessary to decide which ones are A and which ones Z.The direction will be checked as above. The As will be the ones withdirection TRUE (to the right) and Zs will be the others.

[0078] There are many cases in which some attributes are not needed. Forexample, in an unprotected trail the prime attributes will not be used.In these cases they will have value −1, that is a forbidden value forAPS Ids.

[0079] Software Specification

[0080] This section of the description sets out a class diagram andexplains each class and the relationships between them.

[0081] Modular Structure

[0082] Class diagram

[0083]FIG. 13 shows the class diagram for new APS Ids. In this diagram,neither function nor attributes are included for the sake of simplicityof the drawing. They will be explain in the next section.

[0084] Referring to FIG. 13, all the classes and the relationshipsdrafted in the previous section are depicted. The base classes and thosederived from them can be seen. The base classes are abstract classes,which means that they cannot be instantiated. The followingcharacteristics can be noted:

[0085] A chain is composed by chain links.

[0086] A chain pair contains two chains but it is not composed by themsince it contains methods to calculate the Ids.

[0087] A chain link contains two APS TPs.

[0088] The class tmcCApsIdCalculator has a list of pointers to tmcCApsTPobjects. These objects belong to the class tmcCApsSquelch or tmcCApsAZTPdepending on the class of calculator instance. As seen in the diagram(dashed line relationship), each kind of Calculator will use a kind ofTP but the code to register TPs is in the base class and it needs toknow the class of the TPs that it is creating. In order to solve thisproblem the base class has a pure virtual function called CreateApsTP.This function will return a new APS TP object in the heap and isimplemented by the derived classes. Each of these classes specifies inthis way the kind of TP it wants to use.

[0089] One more class is needed in the diagram, namely the class thatmanages the process. It creates two calculators (one of each kind) andthen it calls the proper functions to process the Ids. This class iscalled ProcessApsIds. The component diagram is shown in FIG. 14.

[0090] The boxes in the figure represent the APS files. All of them,except tmchapd, are implementation files. The boxes include their headerfiles. The file tmchapd does not have implementation file but it playsan important role in the diagram. Each module contains the followingclasses:

[0091] tmdxaps:

[0092] 1. tmcCApsIdCalculator

[0093] 2. tmcCApsSquelchIdCalculator

[0094] 3. tmcCApsAZIdCalculator

[0095] 4. ProcessApsId.

[0096] tmdxapsp:

[0097] 1. tmcCApsTP

[0098] 2. tmcCApsSquelchTP

[0099] 3. tmcCApsAZTP.

[0100] tmdxapsl:

[0101] 1. tmcCApsChain

[0102] 2. tmcCApsChainLink

[0103] 3. tmcCApsChainPair

[0104] tmdhapsd: constants and definitions used by the other modules.

[0105] Module/Procedure Description

[0106] All the classes of the class diagram will be described here.

[0107] tmcCApsIdCalculator

[0108] This is the main class in the class structure. Previously, it wasan object of the class invoked from tmcore to perform the whole APS Idscalculation process. In the preferred embodiment of the invention, itwill be done by ProcessApsIds, but the calculation itself will still bedone by this class. As previously mentioned, the current class is splitup into two new classes: one to calculate current APS Ids(tmcCApsSquelchIdCalculator) and the other to calculate the new ones(tmcCApsAZIdCalculator). The common code used by them is placed in abase class and particular code will be placed in two derived classes.

[0109] As can be see in the Calculator Class Diagram in FIG. 15, thebase class defines four pure virtual classes that the derived classesmust implement:

[0110] CreateApsTP: The common code in the base class needs to createAPS TP objects. These objects can belong to two different class, butthis is only known by the derived classes, so it must be decided bythem. This function will be called whenever there is a need to create anAPS TP object and it will return a base class pointer to an APS TPobject in the heap. The class of this object is define by the derivedclasses when implementing this function.

[0111] RecursiveChainBuild: This function builds chains through arecursive process. The one implemented in the tmcCApsSquelchIdCalculatoris the same that the one in the current code. The new one is verydifferent and it encapsulates the main part of the algorithm to buildchains described before.

[0112] CalculateApsIdsOnModel: This function calculates the APS Ids. Theone implemented in the tmcCApsSquelchIdCalculator is the same that inthe current code. The new function performs the calculation in twosteps. First, it creates chain pairs and then it “tells” this pair toassign the values.

[0113] BeginRecursiveChainBuild: This function sets the object to beready to call the recursive chain function. Since the function to createchains is common and the preparations to call the recursive process aredifferent for both algorithms, this function is provided.

[0114] DoWeRegisterTP: This function is called to decide if a TP isregistered or not. Since this decision depends on the attributes andthey are different in both algorithms this virtual function is provided.

[0115] AllocateSquelchAps: This function calls the function to build themodel and then goes through all the TPs in it to allocate the APS Ids.This is the function called from the ProcessApsId object, this is thereason why it is pure virtual, to make all the derived classes defineit.

[0116] Apart from these methods there are three new data members in thenew calculator. All of them are related to the new chain buildingprocess. The chains were linear, but now they have branches. When thealgorithm goes through a branch its behavior is different. In order tobe able to know this situation the variable m_bBranch is set to FALSE.In the same way, in the current algorithm a chain is always built from abegin to an end. However, now it can be built from a middle to an end.In this case, the variable m_bDirection is set to TRUE. The lastvariable m_bCheckProtected is Boolean. It indicates when it is necessaryto check if a SNC is protected. This will be needed if it has notalready been checked. Its initial values will be TRUE.

[0117] ProcessApsIds

[0118] This is the class that controls the whole APS Ids calculationprocess. It is a functor object, that is, a class that behaves like afunction (the operator( ) will be overload to be able to invoke thefunction through the class name). It has been done this way because thisclass is going to have one only method.

[0119] This class will create two calculators, one of each class, and itwill execute both of them. In this way, if there is a mixture of currenttemplates ring and new templates ring both of them will be calculated.If there are current and new templates in the same ring it will returnan error.

[0120] The second calculator is executed if the error code is differentor not Ok. For example, if it is ring not complete it is executedanyway. This is done to maintain the support for incomplete trails.

[0121] tmcCApsTP

[0122] As explained in previous sections there are two different classesof APS TPs, each one of them for each calculator. The main differencebetween them is that the current TP has one attribute and the new onehas four, plus the Set/Get functions.

[0123] Referring to FIG. 16, which represents the class diagramstructure for the APS TPs, the base class defines two pure virtualfunctions. The first one, AllocateApsIds, sets the APS Ids in thevariables that hold them. The difference between the previous functionand the new is the number and name of the attributes. The functionDoIHaveAttributes returns TRUE if the TP has the proper attributes to beset.

[0124] tmcCApsChainLink

[0125] Referring to FIG. 17, which represents the Chain Link ClassDiagram, the data member m_bUsed indicates if the chain link has beenused in any chain. This is important, since in the new algorithm thechain links can be used only in one chain. The data member m_bSNCididentifies the SNC which the chain link is related to. The data memberm_bDirection indicates the direction the chain link works. If it is TRUEthe chain link goes to the right and if is FALSE it goes to the right.

[0126] tmcCApsChain

[0127] These chain links can contain TPs of two different classes (withthe same base class).

[0128] TmcCApsChainPair

[0129] This class stores the two chains (one per direction) thatrepresent a trail in a ring. Referring to FIG. 18, representing theChain Pair Class Diagram, the two data members are pointers to thechains. One to the chain that goes to the right and the other to thechain that goes to the left. There are four Set/Get methods to operatethe chains. As can be seen in the figure, the Set methods are private.This is because the setting is done by the SetChains method, it cannotbe done from outside since it could create corruptions (chains that arenot really pairs). It gets a chain and a collection of chains asarguments and it finds the other ring chain in the collection, settingboth of them in the object. The method AllocateApsIds, allocates the Idsin every TP in the chains (the TPs is the same in both chains).

[0130] The last public method is Contain, used by the calculator methodin charge of building chain pairs. This function gets a chain asargument and checks if it is one of the chains in the pair.

[0131] The two last private methods are TheyArePair and IsComplete. Thefirst of these gets two chains as arguments and checks if they are apair. This is done by getting two SNC ids from one chain and checking ifthe other ring contains this SNC. The first and last chain links SNC areused because it is possible that there are two chains with the same SNCin different rings (a node belonging to two rings). The second function,IsComplete, checks if a chain pair has two members.

[0132] The algorithm

[0133] This part of the specification describes a general algorithmdeveloped to solve the problem of Squelch APS Ids allocation. Thepresent description assumes three specific types of connection, namely:Unprotected, Protected and Closed Scissors.

[0134] In terms of the way an NE is located in a ring, the algorithmcaters for regular NEs (i.e. NEs that take part in one BLSR ring only)and HUB configured ones (i.e. NEs that take part in more then one BLSRring).

[0135] In the HUB configuration, pairs of EP that belong to differentrings are assumed to have different Port Aps Id.

[0136] definitions:

[0137] In order to describe the proposed algorithm the followingdefinitions are used:

[0138] Aps TP

[0139] A CTP supported with “SquelchApsId” subtype. (the template isassumed correct and there is a “PortApsId” attribute in the TTP of thecarrying layer.)

[0140] Chain Link

[0141] An ordered pair of EP in an SNC, the first named “Head” and thesecond named “Tail”.

[0142] Example:

[0143] protected SNC consist of the following 4 Chain Links:{(b,a),(b,a′),(a,b),(a′,b)}

[0144] unprotected SNC consist of 2 chain Links: {(a,b), (b,a)}

[0145] A “Chain Link” holds a property (attribute) that describes itsplace within the Chain: one of the three options: “Begin”, “Middle”,“End”

[0146] Note: A Chain Link may have both “End” and “Begin” attributes atthe same time but if it is a “Middle” it cannot have another attributeat the same time.

[0147] Aps Chain Link

[0148] A Chain Link for which at least one of its TPs is an “Aps TP”.

[0149] Chain In A Ring

[0150] A vector of at least two Aps Chain Links, such that its firstcomponent is with attribute “Begin”, the last is “End” and all the rest(if any) are with attribute “Middle”.

[0151] Example: An intersection of a Unidirectional unprotected trailwith a BLSR ring is a typical Chain In A Ring.

[0152] Note: There is importance in the fact that the minimal chain isof two components.

[0153] Algorithm description:

[0154] The algorithm assumes it has been given a complete trail.

[0155] 1. For each of the SNCs: for each of the TPs, if the TP is an ApsTP, create two Chain Links of the TP and its neighbour(s) wherein thefirst the current TP is “Head” and in the second is “Tail”.

[0156]  Note: a bidirectional trail is assumed and therefore theduplication of the Chain Link creation.

[0157] 1.1 Determine the attribute of the Chain Link. Regarding it aspart of intersection between unidirectional trail and a ring, thefollowing are considered:

[0158] The type of the connection (i.e. “protected”, “Unprotected” and“Closed Scissors”)

[0159] In case only one of the TPs is an Aps TP is it the “Tail” or the“Head”?

[0160] Are the Port Aps Ids equal/different in the Tail from the Head?

[0161] In case they are equal, what is the connection rule between them?

[0162]  (The actual calculation is “switch” based, and will be explainedin more detail in the implementation section later in thisspecification.)

[0163] 1.2 Add each Chain Link to the collection, making sure each ChainLink is unique (i.e. a link is not added if it already exists in thecollection)

[0164] 2. Make all the possible chains of the above collection in thefollowing way:

[0165] 2.1 for each Chain Link with attribute “Begin”, search amongthose with attribute ‘Middle” or “End” for a Chain Link such that thecurrent Links “Head” and the other Links “Tail” are “far ends” in theserver layer trail. Put more simply, create the pieces of the trail thatintersect with the BLSR ring. The building finishes when the link isconnected with attribute “End”.

[0166]  Note: a chain may have more then one Chain Link to continue it(for example in a split caused by “Protected” connection) so each timeall available candidates are checked and, in case of two, the existingchain is duplicated and completed by using each of them separately. Thispart, because of its nature, is done recursively.

[0167] 3. At this point there is a collection of all the possible chainsfrom the original collection of Chain Links.

[0168] 3.1 for each Chain, take the PortApsId of the “Head” TP of thefirst Chain Link.

[0169] 3.2 allocate this number as a Squelch Aps Id in all the “Tail”TPs of all the rest of the Chain Links in the Chain.

[0170] Go Home!! (End of algorithm)

EXAMPLE 1

[0171] For better understanding of the algorithm, a typical example ofMatch Node architecture will be described with reference to FIG. 19:

[0172] The numbers on the Nes are NE Id, but for simplicity are used asPortApsId (In reality, there is no relationship between the two)

[0173] The letters A, B and A′ relate to the tags in the co-related SNC.

[0174] In the description of stage 2, Chain Links are marked in thefollowing syntax:

[0175] (NE id, Tail Tag, Head Tag)

[0176] For example (5,A,B) represents the Chain Link that goes from TP Ato TP B in NE 5.

[0177] Stage 1:

[0178] The list of links to find are as follows: NE Id Chain LinksAttribute 1 (1, A, B) End (1, B, A) Begin 2 (2, B, A) End (2, A, B)Begin (2, B, A′) Middle (2, A′, B) End (*) 3 (3, A, B) Begin (3, B, A)End 5 (5, A, B) Middle (5, B, A) Middle 6 (6, B, A) End (6, A, B) Begin(6, B, A′) Middle (6, A′, B) End (*) 7 (7, A, B) Begin (7, B, A) End 9(9, A, B) End (9, B, A) Begin

[0179] Stage 2:

[0180] This is the list of all possible chains created:

[0181] 1. (1,B,A) (2,B,A′) (5,B,A) (3,B,A)

[0182] 2. (1,B,A) (2,B,A)

[0183] 3. (3,A,B) (5,A,B) (2,A′,B)

[0184] 4. (2,A,B) (1,A,B)

[0185] 5. (9,B,A) (6,B,A′) (7,B,A)

[0186] 6. (9,B,A) (6,B,A)

[0187] 7. (7,A,B) (6,A′,B)

[0188] 8. (6,A,B) (9,A,B)

[0189] Stage 3:

[0190] Stage 3 in chain No. 1 in the list above is illustrated in FIG.20. The notation used in FIG. 20 is such that (*) indicates Squelch Idallocated when chain 4 is processed and (**) indicates Squelch Idallocated when chain 3 is processed.

[0191] Result: The result of this stage is indicated in FIG. 21.

EXAMPLE 2 (Hub)

[0192] In this example NE 9 has the same PortApsId in all four TPs butin other cases it could have different allocation in every ring.

[0193] Stage 1:

[0194] The Chain Links collection is as represented in the followingtable: NE Chain Links Attribute 1 (1, B, A) Begin (1, A, B) End 2 (2, B,A) Middle (2, A, B) Middle 9 (9, B, A) Begin & End (9, A, B) Begin & End6 (6, B, A) Begin (6, A, B) End

[0195] Stage 2:

[0196] Collection of chains:

[0197] (1,B,A) (2,B,A) (9,B,A)

[0198] (9,A,B) (2,A,B) (1,A,B)

[0199] (6,B,A) (9,A,B)

[0200] (9,B,A) (6,A,B)

[0201] Links on the hub may take part in more then one Chain. Forexample, Link (9,A,B) takes part in Chains 2 and 3. Stage 3 is performedas in the first example. The results thus far are as represented in FIG.23.

[0202] Implementation

[0203] The allocation algorithm is encapsulated in a classSquelchApsIdCalculator that supports the following public functions:

[0204] Parametric constructor the parameter is a pointer to a tmcCTrailobject.

[0205] Notes:

[0206] The Database is assumed to be open and the SquelchIdCalculatorholds no responsibility to close it. (i.e. No transaction handling)

[0207] AllocateSquelchId At this call the object will get into the Trailpointed by the pointer and put values for the SquelchApsId.

[0208] Main components of SquelchIdCalculator:

[0209] The SquelchIdCalculator consists of the following parts:

[0210] Pointer to tmcCTrail—This pointer will hold the DB sourcesupplied by the user.

[0211] Aps TP List

[0212] Chain Link

[0213] Trail model—This is the collection (array) of all the Chainsavailable from the Chain Links collection.

[0214] A block diagram of the allocation mechanism is illustrated inFIG. 24.

[0215] Structures description:

[0216] All classes described in this section are add classes that aredefined for the purpose of the SquelchIdCalculator and meant to be usedin the scope of this class only.

[0217] TmcCApsTP:

[0218] The Aps TP class stands for an endpoint in a Subnetworkconnection.

[0219] Components: class tmcCApsTP { public:tmcCApsTP(tmcCTerminationPoint *pRealTP = NULL, tmcEApsTPSwitchMarkeMyMark = tmcEApsTPSwitchMarkNONE, long lMyPortApsId =ApsConstants::INVALID_PORT_APS_ID, long lMySquelchApsId =ApsConstants::INVALID_SQUELCH_APS_ID ); //we use the default copy Ctorin the code of “tmcCApsSquelchIdCalculator::RegisterTP” //in a “new”statement ˜tmcCApsTP( ); RWBoolean operator= =(const tmcCApsTP &Ref)const; RWBoolean operator= =(const tmcCTerminationPoint *pRef) const;//Get function inline tmcCTerminationPoint *GetMyRealTP( ) const {returnm_pMyRealTP;} inline tmcEApsTPSwitchMark GetMySwitchMark( ) const{return m_eMyMark;} inline long GetMyPortApsId( ) const {returnm_lPortApsId;} //Set function inline voidSetMyRealTP(tmcCTerminationPoint *pRealTP) {m_pMyRealTP = pRealTP;}inline void SetMySquelchId(int Model_SqId) {m_lSquelchApsId =Model_SqId;} // find the own PortApsId,set it and return its valuetmdCLogError SetApsId( ); tmdCLogError AllocateSquelchId(tmcCTrail*pTrail); inline void SetPortApsAttrObj(tmcCaomTPAttribute *Ptr){m_pPortApsAttrObj = Ptr;} inline voidSetSquelchApsAttrObj(tmcCaomTPAttribute *Ptr) {m_pSquelchApsAttrObj =Ptr;} tmdCLogError GetMyFarEnd(tmcCTerminationPoint *&pFarEnd); private://private components// ////////////////////// tmcEApsTPSwitchMarkm_eMyMark; long m_lPortApsId; long m_lSquelchApsId; tmcCTerminationPoint*m_pMyRealTP; tmcCaomTPAttribute *m_pPortApsAttrObj; tmcCaomTPAttribute*m_pSquelchApsAttrObj; //private methods // /////////////////////tmcCApsTP &operator=(tmcCApsTP &source) ;//assignment operator inprivate not applicable tmcCApsTP(tmcCApsTP &Ref); // copy Ctor inprivate not applicable };//tmcCApsTP

[0220] Switch Mark—i.e. A,B,A′, or B′

[0221] Port APS ID—An integer with default invalid value of (−1) or thevalue retrieved from the DB immediately after the object's creation

[0222] Squelch APS ID—An integer with default invalid value of (−1) orthe value calculated when the Trail Model is made (see section 3.1.3)

[0223] Pointer to Real TP—pointer to class tmcCTerminationPoint which isthe real TP in the DB which this ApsTP represents

[0224] The Port supports the “==” operator which relay on the “==”operator of the tmcCTerminationPoint class pointed by the Real TPpointers.

[0225] Aps Chain Link

[0226] An Aps Chain Link is an ordered pair of Aps TP and is the basicbrick of the model construction. class tmcCApsChainLink { public:tmcCApsChainLink(tmcCApsTP *pTail=NULL, tmcCApsTP *pHead=NULL); inlinetmcCApsTP *GetTail( ) const {return m_pTailTP;} inline tmcCApsTP*GetHead( ) const {return m_pHeadTP;} tmdCLogError SetAttribute( );inline const ChainLinkAttrib &Attribute( ) const {return m_MyAttribute;}RWBoolean operator=(const tmcCApsChainLink &Ref) const; private:tmcCApsChainLink &operator= =(tmcCApsChainLink &Ref); //assignementpoerator in private //Private members // //////////////////// tmcCApsTP*m_pHeadTP; tmcCApsTP *m_pTailTP; ChainLinkAttrib m_MyAttribute;//seeattribut defined in apshcomondef.hxx //Private functions //////////////////////// tmdCLogErrorMyStatusInTheRing(tmcEApsChainLinkInRing &StatusInRing);tmcEApsChainLinkConfig MyConfig( ); tmdCLogErrorAreTPsInTheSameRing(RWBoolean &answer); };//tmcCApsChainLink

[0227] Components:

[0228] Two pointers to Aps TP one labelled “Head” and one “Tail”

[0229] Links attribute—This attribute relates to the optional locationof the Link object within a Chain (see below). The options are “Begin”,“End” or “Middle”. A Link may have in some cases both “Begin” and “End”attributes. The Attribute(s) is calculated due to the properties of theAps TPs that constitute the Chain Link.

[0230] The Chain Link supports the “==” operator. This operator relay onthe operator “==” of Aps TP. The Chain Link operator compares the Aps TPof two Chain Links.

[0231] Aps Chain

[0232] An Aps Chain is a vector (i.e. Ordered group) of Chain Links,starting with a “Begin” attributed Link and ending with an “End”attributed link, where all the rest are “Middle” labelled.

[0233] This class actually wraps the array, mainly to prevent the userof the class from using the insert option over the array. classtmcCApsChain { public: inline int Length( ) const {returnm_vTheCahin.length( );} inline void AddChainLinkToChain(tmcCApsChainLink*pChainLink) {m_vTheCahin.append(pChainLink);} inline tmcCApsChainLink*Last( ) const {return m_vTheCahin.last( );} inline tmcCApsChainLink*operator[](int index) const {return m_vTheCahin[index];} private:RWTPtrOrderedVector<tmcCApsChainLink> m_vTheCahin; };//tmcCApsChain

[0234] Trail Model

[0235] Trail Model is a group of all the Aps Chains that can be createdfrom the Chain Links in the link list due to the connectivity betweenTPs held by the ApsTP objects.

typedef RWTPtrOrderedVector<class tmcCApsChain>tmcCApsTrailModel;

[0236] Flow of the “tmcCApsSquelchIdCalculator” main functions:

[0237] 1. Make Trail Model

[0238] The actual implementation of the Algorithm is issued in the waythe model is built.

[0239] 1.1. Make Aps TP & Chain Link Lists

[0240] 0. Get all SNC from the Real Trail

[0241] 1. For every SNC

[0242] For every TP in the SNC:

[0243] Does the TP have a “Squelch APS Id” attribute?

[0244] NO—Do nothing.

[0245] YES

[0246] 1.1 Create Aps TP object of self and register* it to Aps TP List

[0247] 1.2 Create Aps TP of neighbour and register* it to Aps TP List

[0248] 1.3 Create Chain Link of self and Neighbour and register* it toChain Link List.

[0249] 1.4 Call this Link to define its attribute.

[0250] 1.5 Repeat 1.3 and 1.4 with the “head” and “tail” TPs the otherway around.

[0251] 1.2.Create Trail Model:

[0252] 1.2.1.Create all possible chains:

[0253] This is a recursive function. Stage 1 is a simple “for” statementin the function “CreateAllPossibleChains( )”. Parts 1.1-1.4.2 arewrapped in the recursive function “RecursiveChainBuild(tmcCApsChain&Chain)”

[0254] For every Chain Link in the Chain Link List that owns a “Begin”attribute (The recursive part)

[0255] 1.1 Take the “Head TP” of the last Chain Link in the Chain andfind the Real TP it owns.

[0256] 1.2 Using the “Get far end” service of “tmcCTerminationPoint”locate the TP of the next Chain Link's Tail.

[0257] 1.3 Compare the new TP with the “Tail” TP of ALL the Chain Linksin the list that have attribute “Middle” or “End” (there might be morethen one)

[0258] 1.3.1 When found, match Chain Link, Duplicate the Chain build sofar and append the new Chain Link to the new copy of the Chain.

[0259] 1.3.2 If the new Chain Link owns “End” attribute, add the newcopy to the “Chain List” (recursive end condition)

[0260] 1.3.3 Else, repeat 1.1-1.4 with the new copy (recursive call)

[0261] 1.4 delete the original chain.

[0262] Notes:

[0263] The recursive implementation is chosen because the number ofcontinuing chains in stage 1.3 is not known in advance, and the natureof the problem is like searching in an unknown tree.

[0264] In the process chains are created and deleted frequently. Theseare arrays of pointers and therefore those operations are not expensivein performance.

[0265] Calculate Squelch ID on Model

[0266] This routine is called after the Trail Model established. Thisfunction implies in a simple way the last section of the algorithm. For( I =0 ; I <TrailModel.size ; ++I) { The Id = TrailModel[ I ] -> At[0]-> Head TP . Get My Port APS Id For (J = 1 ; J< TrailModel[ I ] ->Size ;++J) { TrailModel[ I ] -> At[J] -> Tail Port . Set Squelch Id ( The Id)}// For }//For

[0267] Allocate Squelch ID

[0268] This routine is called when the Trail Model exists and theSquelch Ids are already allocated in the model.

[0269] It minds that every ApsTP in the TP List has a valid Squelch Idallocated. All that is left to do is to go over the TP List and for eachAps TP to allocate the valid ID into the real TP pointed by it.

[0270] Destruction

[0271] The destruction is in the following order:

[0272] 1. free all ports from the list

[0273] 2. free all links from the list

[0274] 3. free all chains from the Trail Model

[0275] Flow of the “tmcCApsChainLink” main functions:

[0276] Set Attribute:

[0277] Chain Link has an attribute “Begin”, “End” or “Middle” accordingto two elements:

[0278] 1. The status in the ring: being a unidirectional item the ChainLink can “enter ring”, “exit from ring”, “in the middle” or “go fromring to ring”

[0279] 2. The configuration of the Chain Link within the SNC. Forexample, a link in which its tail is “A prime” and its head is “B” willalways get the attribute “End” because such Chain Link is the joining ofa protection leg into the main leg of the trail.

[0280] The function is first call “MyStatusInTheRing( )” to calculatethe 1^(st) condition mentioned above. It then enters a double “switch”(i.e. nested switch) statement over the two condition to determine theattribute.

[0281] “My Status In The Ring”

[0282] This function is simply to go with an “if-else” statement over afew possible options:

[0283] If “Tail” TP has no Port Aps Id and “head” does, then the ChainLink “Enter Ring” status.

[0284] If it is the other way around, it is of course, “Exit Ring”

[0285] If both TPs have valid Ids but different, it means that the ChainLink goes from one ring to another within a Hub NE.

[0286] If both TPs have the same (valid) value, “AreTPsInTheSameRing( )”is called (see description below) to evaluate whether the ports are ofthe same ring or not.

[0287] There is also special treatment with special case of SNC of type“unprotected” with only one TP but this is of little interest to thesystem.

[0288] Are TPs In The Same Ring?

[0289] In case the two TPs have the same PortApsId it may be the normalNE in the middle of a ring or it might be the case of hub configurationwhere the ports have the same ID in both rings.

[0290] When an NE is set in hub configuration, each pair of aggregatesshare separate CTP groups that define them as belonging to the samering. Groups of this kind are marked with special fixed TPAM attributesand the value of this TPAM marks the group. In this function this valuefrom the “head Tp” and the “tail Tp” is searched for. If both values areequal then the two TPs are of the same hub-group and therefore of thesame ring.

[0291] In the case where the configuration is not a hub configuration,the search ends with empty strings which is a valid result. In otherwords, if the search for both TPs comes back with (“”) it implies anormal NE and the ports are of the same ring.

[0292] Error handling:

[0293] As soon as this feature is implemented, all trails should beprovisioned with the support of APS ID (if applicable). Failure in thecalculation of APS IDs is enough reason not to submit the applied trail.In the light of those guiding lines the approach in error handling issuccess only. In other words, every unsuccessful stage in the flow ofthe calculation will cause a complete failure.

[0294] All non-void functions in the feature use “tmdCLogError” as theirreturn class where the return codes are simply “OK” or “Not OK”. Thiserror handling concept enables the comfortable code style of thenegative approach instead of using the “if/else” nesting approach.

EXAMPLES

[0295] “negative approach”: TmdCLogError Function (....) { tmdCLogErrorRV; RV = StageOne(....) If(RV.Code != OK) { return RV; } //stage 2 isexecuted in the same scope of stage 1. ....... return RV; } “if/elsenesting approach” TmdCLogError Function (....) { tmdCLogError RV; RV =StageOne(....) If(RV.Code == OK) { //stage 2 is nested in the “if”statement ....... } else { //error handling } }

[0296] The advantage of the negative approach becomes apparent as soonas a function with three or four stages is considered.

[0297] SUMMARY

[0298] It can thus be appreciated that the invention provides a uniquesolution to the provision and allocation of squelch IDs to networkelements of a communication system or network.

What we claim is:
 1. A method of allocating squelch identifiers in acommunication network incorporating BLSR protection, the networkcomprising a plurality of interconnected network elements, the methodcomprising: Determining chain links between network elements; Settingattributes (begin, middle, end) corresponding to the chain links;Building chains by joining chain links together; Matching pairs ofchains connecting network elements at the ends of chains; and Allocatingsquelch identifiers to those network elements interconnected by matchingpairs of chains.
 2. A method as claimed in claim 1, wherein the step ofbuilding chains comprises joining chain links having matchingtermination points.
 3. A method as claimed in claim 1, wherein the stepof matching pairs of chains comprises searching for chainsinterconnecting the same two network elements but pointing in oppositedirections.
 4. A method as claimed in claim 1, wherein each chain linkconsists of a network element termination point at each end and anintermediate sub-network connection.
 5. A BLSR-protected communicationnetwork provided with squelch identifiers by the method claimed inclaim
 1. 6. A communication signal transmitted over a BLSR-protectedcommunication network as claimed in claim
 5. 7. A carrier for analgorithm adapted to perform the squelch identifier allocation method asclaimed in claim 1.